<div id="layout_main_top">

</div>
<div id="layout_main">

			
		{if $smarty.session.level gte $USER_RIGHTS.download_add}
		<div class="admin_menu">
			<a href='index.php?page=admin_download&action=new'><img src="./images/buttons/raid_add.png" alt="" /> Add Download</a>
		</div>
		{/if}

			

<DIV class="layout_large_table_top">

</DIV>
<DIV class="layout_large_table">
<table id="main_table" cellspacing='0' >
<tr class="menu_header">
	<th>#</th>
	<th align='left'>
			Name
	</th>
	<th align='left'>
			Filename
	</th>
	<th align='right'>
			Size
	</th>
	<th class="center">
			Level
	</th>

	<th>
		&nbsp;
	</th>
</tr>

{foreach name=downloads item=download_item from=$downloads}


	<tr class="{cycle values="row_1,row_2" advance=true}" id="user{$single_user.user_id}">
	<td>{$download_item.download_id}</td>
	<td align='left'>{$download_item.name}</td>
	<td align='left'>{$download_item.file_name}</td>
	<td align='right'>{math equation="y / 1024" y=$download_item.file_size|default:'0' format="%01.1F"} KiB</td>
	<td align='center'>{$download_item.user_level}</td>
	<td>
	{if $smarty.session.level gte $USER_RIGHTS.download_delete}
	<img src="./images/buttons/delete.gif" alt="" onclick="javascript:deleteDownload({$download_item.download_id}, 'admin_download')" />
	{/if}
	{if $smarty.session.level gte $USER_RIGHTS.download_edit}
	<a href='index.php?page=admin_download&action=edit&download_id={$download_item.download_id}'><img src="./images/buttons/edit.gif" alt="" width="14" height="14" {popup text="Edit " center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} /></a>
	{/if}
	</td>
</tr>

{foreachelse}
<tr class="{cycle values="row_1,row_2"}">
	<td colspan=6>No downloads could be found.</td>
</tr>

{/foreach}

<tr class="{cycle values="row_1,row_2"}">
	<td colspan=6>

	</td>
</tr>

<tr class="menu_footer">
	<td colspan=6></td>
</tr>



</table>
</div>

<DIV class="layout_large_table_bottom">

</DIV>
</div>
<div id="layout_main_bottom">

</div>
